//
// Created by 30986 on 2020/11/23.
//对称的素数

#include <iostream>
#include <cmath>
bool isPrime(int n){
    int m = sqrt(double(n));
    for (int i = 3; i <=m ; i+=2) {
        if( n%i == 0)return false;
    }
    return true;
}
int main(){
    for (int i = 1; i <=9; i+=2) { //构造数据
        for (int j = 0; j <=9; ++j) {
            int k = 101*i + 10*j;
            if (isPrime(k))
                std::cout<<k<<"\n";
        }
    }
}